package org.zero.onlinesubject.service;

import org.springframework.data.redis.core.StringRedisTemplate;
import org.zero.onlinesubject.common.param.LiveRoomParam;
import org.zero.onlinesubject.common.vo.LiveRoomVo;
import org.zero.onlinesubject.common.vo.Result;
import org.zero.onlinesubject.entity.LiveRoom;
import com.baomidou.mybatisplus.extension.service.IService;
import org.zero.onlinesubject.entity.User;
import org.zero.onlinesubject.mapper.UserMapper;

import java.util.List;

/**
 *
 */
public interface LiveRoomService extends IService<LiveRoom> {

    Boolean isTimeConflict(String startTime);

    Result<LiveRoomVo> getLiveInfo(String liveId);

    List<LiveRoom> getLiveList(String liveName,Integer current,Integer size);

    List<LiveRoom> getOwnLive();

    Result<String> saveLive(LiveRoomParam param);

    boolean updateViewCount(String liveId);

    void updateLearnCount(StringRedisTemplate stringRedisTemplate, UserMapper userMapper, User user);

    Boolean updateLive(String liveId, Boolean state);

    Boolean deleteLive(String liveId);
}
